home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.1 (Developer) [x86] / NeXT Step 3.1 Intel dev.cdr.dmg / NextDeveloper / Headers / bsd / sys / conf.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-04-30  |  2.2 KB  |  119 lines

  1. /* 
  2.  * Mach Operating System
  3.  * Copyright (c) 1987 Carnegie-Mellon University
  4.  * All rights reserved.  The CMU software License Agreement specifies
  5.  * the terms and conditions for use and redistribution.
  6.  */
  7. /*
  8.  *
  9.  * HISTORY
  10.  * 13-Feb-88  John Seamons (jks) at NeXT
  11.  *    NeXT: added d_getc and d_putc entries in cdevsw for console support.
  12.  *
  13.  * 18-Nov-87  Avadis Tevanian (avie) at Carnegie-Mellon University
  14.  *    Removed conditionals, history.
  15.  */
  16.  
  17. /*
  18.  * Copyright (c) 1982, 1986 Regents of the University of California.
  19.  * All rights reserved.  The Berkeley software License Agreement
  20.  * specifies the terms and conditions for redistribution.
  21.  *
  22.  *    @(#)conf.h    7.1 (Berkeley) 6/4/86
  23.  */
  24.  
  25. extern int nulldev();
  26. extern int nodev();
  27.  
  28. /*
  29.  * Declaration of block device
  30.  * switch. Each entry (row) is
  31.  * the only link between the
  32.  * main unix code and the driver.
  33.  * The initialization of the
  34.  * device switches is in the
  35.  * file conf.c.
  36.  */
  37. struct bdevsw
  38. {
  39.     int    (*d_open)();
  40.     int    (*d_close)();
  41.     int    (*d_strategy)();
  42.     int    (*d_dump)();
  43.     int    (*d_psize)();
  44.     int    d_flags;
  45. };
  46. #ifdef KERNEL
  47. extern struct    bdevsw bdevsw[];
  48. extern int nblkdev;
  49.  
  50. /*
  51.  * Contents of empty bdevsw slot.
  52.  */
  53. #define     NO_BDEVICE                        \
  54.     { nodev,    nodev,        nodev,        nodev,    \
  55.       0,        0 }
  56.  
  57. #endif
  58.  
  59. /*
  60.  * Character device switch.
  61.  */
  62. struct cdevsw
  63. {
  64.     int    (*d_open)();
  65.     int    (*d_close)();
  66.     int    (*d_read)();
  67.     int    (*d_write)();
  68.     int    (*d_ioctl)();
  69.     int    (*d_stop)();
  70.     int    (*d_reset)();
  71.     int    (*d_select)();
  72.     int    (*d_mmap)();
  73. #if    NeXT
  74.     int    (*d_getc)();
  75.     int    (*d_putc)();
  76. #endif    NeXT
  77. };
  78. #ifdef KERNEL
  79. extern struct    cdevsw cdevsw[];
  80. extern int nchrdev;
  81.  
  82. /*
  83.  * Contents of empty cdevsw slot.
  84.  */
  85. #define     NO_CDEVICE                            \
  86.     {                                    \
  87.     nodev,        nodev,        nodev,        nodev,        \
  88.     nodev,        nodev,        nodev,        seltrue,    \
  89.     nodev,        nodev,        nodev,                \
  90.     }
  91.  
  92. #endif
  93.  
  94. /*
  95.  * tty line control switch.
  96.  */
  97. struct linesw
  98. {
  99.     int    (*l_open)();
  100.     int    (*l_close)();
  101.     int    (*l_read)();
  102.     int    (*l_write)();
  103.     int    (*l_ioctl)();
  104.     int    (*l_rint)();
  105.     int    (*l_rend)();
  106.     int    (*l_meta)();
  107.     int    (*l_start)();
  108.     int    (*l_modem)();
  109. #if    romp || NeXT
  110.     int    (*l_select)();
  111. #endif    romp || NeXT
  112. #if    NeXT
  113.     int    l_kind;        /* if 0, follows normal clist usage */
  114. #endif    NeXT
  115. };
  116. #ifdef KERNEL
  117. struct    linesw linesw[];
  118. #endif
  119.